%% Author: Phil
%% Created: 10 Jun 2009
%% Description: TODO: Add description to server
-module(simpleServer).

%% Include files

%% Exported Functions
-export([start/0]).

%% API Functions

start() -> 
	register(simpleServer, spawn(fun() -> loop() end)).


%% Local Functions

loop() ->
	receive
		{Pid,{text,Text}}->
			io:format("text: ~p~n", [Text]),
			Pid!{self(),{display,Text}},
			loop();
		Any ->
			io:format("Message: ~p~n", [Any]),
			loop()
	end.

